Skip to content

Conversation

mayeut
Copy link

@mayeut mayeut commented Nov 10, 2024

A couple fixes for actions#275
Build (rebased on upstream main): https://github.com/mayeut/python-versions/actions/runs/11767364478

LDFLAGS applies to everything including later user builds (e.g. building a wheel)
LDFLAGS_NODIST could be used but is probably unnecessary (also applies to cpython stdlib C modules which is probably unwanted)
LIBS only applies to the python executable and libpython library, this is most likely enough. https://docs.python.org/3/using/configure.html#envvar-LIBS
@@ -31,7 +31,7 @@ class UbuntuPythonBuilder : NixPythonBuilder {
$pythonBinariesLocation = $this.GetFullPythonToolcacheLocation()

### To build Python with SO, passing relative path W.r.t to the binary location.
$env:LDFLAGS="-Wl,-rpath='`$`$ORIGIN/../lib'"
$env:LIBS = "-Wl,--enable-new-dtags,-rpath='`$`$ORIGIN/../lib'"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit of LIBS over LDFLAGS?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's in the commit message:

LDFLAGS applies to everything including later user builds (e.g. building a wheel)
LDFLAGS_NODIST could be used but is probably unnecessary (also applies to cpython stdlib C modules which is probably unwanted)
LIBS only applies to the python executable and libpython library, this is most likely enough. https://docs.python.org/3/using/configure.html#envvar-LIBS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants